package com.hmall.cart.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author lxr
 * @version 1.0
 * @since 2025-09-02 17:12
 */
@Configuration
public class RemoteCallConfig {

    @Bean
    @LoadBalanced  //负载均衡：默认是轮询
    public RestTemplate restTemplate() {
        return new RestTemplate();
    }

}
